<template>
    <button @click="show=!show">切换隐藏/显示组件</button>
    <Demo v-if="show"></Demo>
</template>

<script>
    import {ref} from 'vue'
    import Demo from './components/Demo'

    export default {
        name: 'App',
        components: {
            Demo
        },
        setup() {
            let show = ref(true)
            return {
                show
            }
        }
    }
</script>

<style>
    #app {
        font-family: Avenir, Helvetica, Arial, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-align: center;
        color: #2c3e50;
        margin-top: 60px;
    }
</style>
